/**
 * JAVACC DEMO 1.0
 * @copy right iussoft company All rights reserved.
 * @Package com.iussoft.portal.servlet
 */
package com.apache.portal.contorller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.apache.tools.ConfigUtil;
import com.apache.tools.StrUtil;

/**
 * description:  页面跳转sevlet
 */
@SuppressWarnings("serial")
public class SendPageServlet extends BaseAction {

	protected void doInvoke(HttpServletRequest request, HttpServletResponse response) throws ServletException,
			IOException {
		String doCode = StrUtil.doNull(request.getParameter("toPage"), "index");
		String pgeUrl = "/WEB-INF/pages" + ConfigUtil.getInstance().getValueByProperty("pages.properties", doCode);
		String params = StrUtil.doNull(request.getQueryString(), "");
		if (StrUtil.isNotNull(params))
			pgeUrl += "?" + params;
		request.getRequestDispatcher(pgeUrl).forward(request, response);
	}

}
